HDFS-diskbalance问题
开头怀疑是sentry的权限问题,就也给hdfs用户hive元数据库的admin权限
发现问题依旧
hdfs diskbalancer
一般来说,对于需要HDFS超级用户权限的命令,使用任何HDFS主体去kinit都是有效的。然而,为了增加datanodes安全性在CDH 5.10.0中增加了一个变化。–HDFS11069
这一更改确保了对任何datanode运行一个超级用户命令,您必须首先执行kinit并使用和datanode相同服务主体
To run the intra node balancer, you must do the following:
- Ensure that the HDFS Gateway is deployed on the Datanode you wish to run it against.(个人认为只需要保证本机使用HDFS-cli能连上nn就好,自己配置也行当然通过cm配置会比较块)
Login to the datanode you wish to balance, and kinit as follows:
cd /var/run/cloudera-scm-agent/process/`ls -1 /var/run/cloudera-scm-agent/process/ | grep 'hdfs-DATANODE$' |sort -n | tail -1`kinit -kt hdfs.keytab hdfs/$(hostname -f)Run the intra node balancer as usual:
hdfs diskbalancer -plan datanode.hostname.com
hdfs diskbalancer -plan $(hostname -f)